package com.plate.common.core.utils;

import java.util.Date;
import java.util.Random;

/**
 * @ClassName StrUtils
 * @Description TODO
 * @Author jiaxd
 * @Date 2023年11月25日 13:25
 * @Version 1.0
 */

public class StrUtils {

    public static String getRandomNumberString(int length) {
        String base = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        Random random = new Random((new Date()).getTime());
        StringBuffer sb = new StringBuffer();

        for(int i = 0; i < length; ++i) {
            int number = random.nextInt(base.length());
            sb.append(base.charAt(number));
        }

        return sb.toString();
    }

}
